describe('practice-4-1', function () {

    it("求两个正整数的最大公约数", function () {
        expect(greatest_common_divisor(10,2)).toBe(2);
        expect(greatest_common_divisor(55,17)).toBe(1);
        var greatest_divisor = greatest_common_divisor(135,25);
        var temp_m = 135/greatest_divisor;
        var temp_n = 25/greatest_divisor;
        while(temp_n>1)
        {
            var temp = temp_m % temp_n;
            if(temp === 0)
            {
                expect(temp_n).toBe(1);
                break;
            }
            temp_m = temp_n;
            temp_n = temp;
        }
    });

});